package com.cskaoyan.javase.oop3._2inner._1member._2exercise;

/**
 * 牛刀小试:补全程序，使得可以输出三个num
 *
 * @since 11:21
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        Outer o = new Outer();
        Outer.Inner oi = o.new Inner();
        oi.show();
    }
}

class Outer {
    public int num = 10;

    public Outer() {
        System.out.println("外围类的无参构造");
    }

    class Inner {
        public int num = 20;

        public Inner() {
            System.out.println("成员内部类的无参构造");
        }

        public void show() {
            int num = 30;
            System.out.println(num);
            System.out.println(this.num);
            System.out.println(Outer.this.num);
        }
    }
}